package com.ruoyi.system.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.AppDynamic;
import com.ruoyi.system.domain.AppDynamicMsg;

/**
 * 动态Service接口
 * 
 * @author ruoyi
 * @date 2023-02-27
 */
public interface IAppDynamicService  extends IService<AppDynamic>
{
    /**
     * 查询动态
     * 
     * @param id 动态主键
     * @return 动态
     */
    public AppDynamic selectAppDynamicById(Long id);

    /**
     * 查询动态列表
     * 
     * @param appDynamic 动态
     * @return 动态集合
     */
    public List<AppDynamic> selectAppDynamicList(AppDynamic appDynamic);

    /**
     * 新增动态
     * 
     * @param appDynamic 动态
     * @return 结果
     */
    public int insertAppDynamic(AppDynamic appDynamic);

    /**
     * 修改动态
     * 
     * @param appDynamic 动态
     * @return 结果
     */
    public int updateAppDynamic(AppDynamic appDynamic);

    /**
     * 批量删除动态
     * 
     * @param ids 需要删除的动态主键集合
     * @return 结果
     */
    public int deleteAppDynamicByIds(Long[] ids);

    /**
     * 删除动态信息
     * 
     * @param id 动态主键
     * @return 结果
     */
    public int deleteAppDynamicById(Long id);

    AjaxResult releaseDynamic(AppDynamic dynamicEntity);

    void addLikeCount(Long dynamicId);

    void addCommentCount(Long dynamicId);

    void reduceCommentCount(Long dynamicId, int size);
}
